Skip to content

Add max_length validation for VARCHAR/CHAR in Pydantic models (issue …#76

Merged
xnuinside merged 2 commits intomainfrom
issue-48
Jan 18, 2026
Merged

Add max_length validation for VARCHAR/CHAR in Pydantic models (issue …#76
xnuinside merged 2 commits intomainfrom
issue-48

Conversation

@xnuinside
Copy link
Owner

#48)

  • Generate Field(max_length=N) for VARCHAR(N) and CHAR(N) columns
  • Works for both pydantic and pydantic_v2 generators
  • Nullable fields with max_length get Field(default=None, max_length=N)
  • Fields with default values preserve defaults in Field()
  • Add tests for max_length generation

)

- Generate Field(max_length=N) for VARCHAR(N) and CHAR(N) columns
- Works for both pydantic and pydantic_v2 generators
- Nullable fields with max_length get Field(default=None, max_length=N)
- Fields with default values preserve defaults in Field()
- Add tests for max_length generation
@xnuinside xnuinside merged commit d35760f into main Jan 18, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant